﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using Micronet.OpenWeb.Com.BLL;
using Micronet.OpenWeb.Com.Controls;
using Micronet.OpenWeb.Common;
using Micronet.OpenWeb.Entity;
using Micronet.OpenWeb.Utils;
using Telerik.Web.UI;


namespace Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenCommunity
{
    public partial class OpenCommunityProfilesAdmin : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            OwOpenCommunityProfilesEntity o = new OwOpenCommunityProfilesEntity();
           
         
        }

        protected void IsDeletedCb_CheckedChanged(object sender, EventArgs e)
        {

            var isDeletedCheckBox = (OwCheckBox)sender;
            var obj = OwOpenCommunityProfilesBLL.OwGetEntity(isDeletedCheckBox.Text.Trim().OwToInt64TryParse());
            obj.IsDeleted = isDeletedCheckBox.Checked.ToString().OwToBoolean();
            if (OwOpenCommunityProfilesBLL.OwSave(obj) > 0)
            {
                OpenCommunityProfilesAdminGrid.Rebind();

            }

        }

       
    }
}